unit DMClient;

interface

uses
  System.SysUtils, System.Classes, kbmMWClient, kbmMWCustomConnectionPool,
  kbmMWClientDataset, kbmMemTable, kbmMWStreamFormat, kbmMWBinaryStreamFormat,
  kbmMWSecurity, kbmMWDCP2Crypt, kbmMWCustomTransport,
  kbmMWTCPIPIndyClientTransport;

type
  TdtmdlClientLink = class(TDataModule)
    kbmwtcpndyclntrnsprtLink: TkbmMWTCPIPIndyClientTransport;
    kbmwpldsnLink: TkbmMWPooledSession;
    kbmMWDCP2Crypt1: TkbmMWDCP2Crypt;
    kbmwbnrystrmfrmtLink: TkbmMWBinaryStreamFormat;
    kbmccplLink: TkbmMWClientConnectionPool;
    kbmscLink: TkbmMWSimpleClient;
    procedure DataModuleCreate(Sender: TObject);
  private
    procedure InitializeComponent();
  public
    { Public declarations }
  end;

var
  dtmdlClientLink: TdtmdlClientLink;

implementation

{%CLASSGROUP 'System.Classes.TPersistent'}

{$R *.dfm}
uses kbmMWGlobal,kbmMWZipStdTransStream;
procedure TdtmdlClientLink.DataModuleCreate(Sender: TObject);
begin
   InitializeComponent;
end;

procedure TdtmdlClientLink.InitializeComponent;
begin
  with kbmwtcpndyclntrnsprtLink do
  begin
     Crypt:=kbmMWDCP2Crypt1;
     Host:='127.0.0.1';
     //Host:='172.19.100.107';
     Port:=12582;
     RequestTimeout:=30;
     StreamFormat:='ZIPPED';
     StringConversion:=mwscFixed;
     MaxRetries:=2;
  end;

  with  kbmscLink do
  begin
    Password:='xalion@#123456';
    Username:='xalion';
    Transport:=kbmwtcpndyclntrnsprtLink;
  end;

  with kbmccplLink do
  begin
    Transport:= kbmwtcpndyclntrnsprtLink;
  end;

  with kbmwpldsnLink do
  begin
    ConnectionPool:=kbmccplLink;
    SessionName:='demo';
  end;
end;

end.
